﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using RayDen.SceneLab.Controllers.Frame;
using RayDen.SceneLab.UI;

namespace RayDen.SceneLab.Controllers.FormControllers
{
    public class MainFormController : FormControllerBase<AppForm>
    {
        public MainMenuController MenuController;

        public EngineConfigurationController ConfigurationController;

        public FrameController FrameController;

        public MainFormController(Form owner) : base(owner)
        {
            MenuController = new MainMenuController(this.owner.MainMenuStrip); 
            FrameController = new FrameController();
        }

        public void ShowLog()
        {
            this.ShowForm<LogForm>();
        }

        public void ShowSettings()
        {
            this.ShowForm<ApplicationSettingsForm>();
        }



        private void ShowForm<TForm>()
            where TForm:Form, new()
        {
            var form = new TForm();
            form.Show(this.owner);
        }

        internal void ShowEditor()
        {
            this.ShowForm<ImageEditorForm>();
        }

        internal void ShowSolids()
        {
            this.ShowForm<ProceduralTextureEditorForm>();
        }

        internal void ShowMaterialEditor()
        {
            this.ShowForm<MaterialEditForm>();
        }
    }
}
